From 3171c297631e30e909776def76677aa61bb34cb0 Mon Sep 17 00:00:00 2001 From: tsteven4 <13596209+tsteven4@users.noreply.github.com> Date: Tue, 23 Mar 2021 09:46:42 -0600 Subject: [PATCH] pvs fix V668 There is no sense in testing the 'wpt_tmp' pointer against null, as the memory was allocated using the 'new' operator. The exception will be generated in the case of memory allocation error. --- ozi.cc | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/ozi.cc b/ozi.cc index c2a408901..4c3058409 100644 --- a/ozi.cc +++ b/ozi.cc @@ -822,13 +822,9 @@ data_read() } break; case rtedata: - if (linecount > 5 && wpt_tmp) {/* skipping over file header */ + if ((linecount > 5) && !header) {/* skipping over file header */ ozi_convert_datum(wpt_tmp); - if (!header) { - route_add_wpt(rte_head, wpt_tmp); - } else { - delete wpt_tmp; - } + route_add_wpt(rte_head, wpt_tmp); } else { delete wpt_tmp; } -- 2.30.2